;
LetStart     equ 0
ObjScrollY   equ 76
TILE_SPC     equ 0  

;
IniObjectScroll:
 ld   bc,$1500
 ld   hl,OAMbuf+LetStart*4
IosLoop:
 ld   a,c
 rra
 rra
 rra
 and  $1f
 add  ObjScrollY

 ld   [hli],a
 ld   a,c
 ld   [hli],a
 add  a,8
 ld   c,a
 ld   a,TILE_SPC
 ld   [hli],a
 xor  a
 ld   [hli],a
 dec  b
 jr   nz,IosLoop
 ld   hl,ObjScrStadia
 ld   [hl],1
IniOSstart:
 put16 ObjScrTextStore,GreetinxText
 ld   a," "
 ret
;
MoveObjScroll:
 ld   hl,ObjScrStadia
 dec  [hl]
 jp   nz,nonextLet
 ld   bc,8
 ld   [hl],c
 ld   de,-4
 ld   hl,OAMbuf+LetStart*4+4+2
 rept 19                ; make closed loop later,if will no place; 
 ld   a,[hl]            ; here transfering char codes
 add  hl,de
 ld   [hl],a
 add  hl,bc
 endr 
 ld   a,[hl]
 add  hl,de
 ld   [hl],a
;
 ld   a,c               ; c already 8
 ld   de,4
 ld   hl,OAMbuf+LetStart*4+1
 rept 20                ; add 8 to xpos at each object
 ld   [hl],a
 add  hl,de
 add  a,c
 endr
 ld   [hl],a
 ld   hl,ObjScrTextStore
 ld   a,[hli]
 ld   d,[hl]
 ld   e,a
 ld   a,[de]
 inc  de
 ld   [hl],d
 dec  hl
 ld   [hl],e
 cp   $ff
 call z,IniOSstart
 sub  32
 jr   z,LetGot
 sub  14
 cp   13
 jr   c,LetGot
 sub  5
LetGot:
 ld   [OAMbuf+(LetStart+20)*4+2],a
nonextLet:
 ld   de,4
 ld   hl,OAMbuf+LetStart*4+1
 rept 20                ; make closed loop later,if will no place; b-counter
 dec  [hl]
 add  hl,de
 endr
 dec  [hl]
 ret
   
 
 

 
